package com.freedom.ums.member.infrastructure.persistence.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.freedom.ums.member.infrastructure.persistence.pojo.po.MemberPO;
import com.freedom.ums.member.infrastructure.persistence.pojo.query.admin.AdminMemberPageQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MemberMapper extends BaseMapper<MemberPO> {

    Page<MemberPO> selectMemberPage(Page<MemberPO> page, @Param("queryParam") AdminMemberPageQuery queryParam);

    int deleteByPrimaryKey(Integer id);

    boolean insertMember(MemberPO record);

    int insertSelective(MemberPO record);

    MemberPO selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MemberPO record);

    int updateByPrimaryKey(MemberPO record);

    Boolean batchUpdateStatus(@Param("memberIds") List<Integer> memberIds, @Param("status") Integer status);

    MemberPO selectMemberByMobile(@Param("mobile") String mobile);
}